<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>RAG基础概念测试</title>
</head>
<body>
    <div class="space-y-6">
        <!-- 概述 -->
        <div class="card rounded-xl p-6">
            <h2 class="text-2xl font-bold mb-4 section-title">概述</h2>
            <p class="text-gray-700 leading-relaxed">
                检索增强生成（Retrieval-Augmented Generation，RAG）是一种结合外部知识检索和大语言模型生成的技术。
                通过检索相关文档来增强模型的回答能力，有效缓解了传统大语言模型在知识时效性和准确性方面的局限性。
            </p>
        </div>

        <!-- 核心组件 -->
        <div class="card rounded-xl p-6">
            <h2 class="text-2xl font-bold mb-4 section-title">核心组件</h2>
            <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                <div class="text-center p-4 bg-blue-50 rounded-lg">
                    <div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center mx-auto mb-3">
                        <i class="fas fa-search text-blue-600"></i>
                    </div>
                    <h3 class="font-semibold text-gray-900">检索模块</h3>
                    <p class="text-sm text-gray-600 mt-2">从外部知识库中动态获取相关信息</p>
                </div>
                <div class="text-center p-4 bg-green-50 rounded-lg">
                    <div class="w-12 h-12 rounded-full bg-green-100 flex items-center justify-center mx-auto mb-3">
                        <i class="fas fa-puzzle-piece text-green-600"></i>
                    </div>
                    <h3 class="font-semibold text-gray-900">增强模块</h3>
                    <p class="text-sm text-gray-600 mt-2">将检索结果与查询融合构建上下文</p>
                </div>
                <div class="text-center p-4 bg-purple-50 rounded-lg">
                    <div class="w-12 h-12 rounded-full bg-purple-100 flex items-center justify-center mx-auto mb-3">
                        <i class="fas fa-comment-dots text-purple-600"></i>
                    </div>
                    <h3 class="font-semibold text-gray-900">生成模块</h3>
                    <p class="text-sm text-gray-600 mt-2">基于增强上下文生成最终响应</p>
                </div>
            </div>
        </div>

        <!-- 工作流程 -->
        <div class="card rounded-xl p-6">
            <h2 class="text-2xl font-bold mb-4 section-title">工作流程</h2>
            <div class="space-y-4">
                <div class="flex items-center">
                    <div class="w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center text-sm font-bold mr-4">1</div>
                    <div>
                        <h3 class="font-semibold">用户查询</h3>
                        <p class="text-gray-600 text-sm">用户输入问题或需求</p>
                    </div>
                </div>
                <div class="flex items-center">
                    <div class="w-8 h-8 rounded-full bg-green-500 text-white flex items-center justify-center text-sm font-bold mr-4">2</div>
                    <div>
                        <h3 class="font-semibold">检索相关文档</h3>
                        <p class="text-gray-600 text-sm">从知识库中检索相关信息</p>
                    </div>
                </div>
                <div class="flex items-center">
                    <div class="w-8 h-8 rounded-full bg-purple-500 text-white flex items-center justify-center text-sm font-bold mr-4">3</div>
                    <div>
                        <h3 class="font-semibold">上下文融合</h3>
                        <p class="text-gray-600 text-sm">将检索结果与查询融合</p>
                    </div>
                </div>
                <div class="flex items-center">
                    <div class="w-8 h-8 rounded-full bg-orange-500 text-white flex items-center justify-center text-sm font-bold mr-4">4</div>
                    <div>
                        <h3 class="font-semibold">生成回答</h3>
                        <p class="text-gray-600 text-sm">基于增强上下文生成最终响应</p>
                    </div>
                </div>
            </div>
        </div>

        <!-- 技术优势 -->
        <div class="card rounded-xl p-6">
            <h2 class="text-2xl font-bold mb-4 section-title">技术优势</h2>
            <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                <div class="p-4 border-l-4 border-blue-500 bg-blue-50">
                    <h3 class="font-semibold text-gray-900">动态知识更新</h3>
                    <p class="text-sm text-gray-600 mt-1">无需重新训练LLM即可接入最新知识库</p>
                </div>
                <div class="p-4 border-l-4 border-green-500 bg-green-50">
                    <h3 class="font-semibold text-gray-900">缓解幻觉问题</h3>
                    <p class="text-sm text-gray-600 mt-1">依赖外部证据提升生成可靠性</p>
                </div>
                <div class="p-4 border-l-4 border-purple-500 bg-purple-50">
                    <h3 class="font-semibold text-gray-900">领域适应性</h3>
                    <p class="text-sm text-gray-600 mt-1">通过定制知识库支持专业场景</p>
                </div>
                <div class="p-4 border-l-4 border-orange-500 bg-orange-50">
                    <h3 class="font-semibold text-gray-900">可验证性</h3>
                    <p class="text-sm text-gray-600 mt-1">生成内容基于检索到的可验证信息</p>
                </div>
            </div>
        </div>
    </div>
</body>
</html> 